<?php
include("modules/account/accountclass.php");
?>
<?php
	$obj=new Account();
	
	$mod=new Module();
	
	if($id != "")
		$obj->loadByKey($id);
	else
	{
		$obj->position = $obj->getNextPos($parent);
		
	}
	include("FCKeditor/fckeditor.php");
?>
<form id="frm">
<div class="ContentTitle">
    <div class="left" style="padding-top:8px"><?php echo $objModule->ModuleName?></div>
    <div class="CMSButton right">
        <a onclick="save()">Save</a>
        <a href="?module=<?php echo $module?>">Cancel</a>
    </div>    
    <div class="clear"></div>
</div>

<div class="clear"></div>
<div id="error" class="error"></div>
<div id="Tab1" class="TabContainer ngt_Product" >
    <table width="100%">
    	
        <tr>
            <td width="10%">
                Mã tai khoảng:
            </td>
            <td>
                <input type="text" name="accountid" <?php echo $id!=""?'readonly="readonly"':''?>  value="<?php echo $obj->accountid?>" />
                <input type="hidden" name="parent" value="<?php echo $obj->parent?>" />
                <input type="hidden" name="id" value="<?php echo $obj->accountid?>" />
            </td>
        </tr>     
		<tr>
            <td width="10%">
                Tên tài khoảng:
            </td>
            <td>
                <input type="text" name="accountname" value="<?php echo $obj->accountname?>" />
                <input type="hidden" name="position" value="<?php echo $obj->position?>" />
            </td>
        </tr>
        <tr>
            <td width="10%">
                Số bài đăng/tháng:
            </td>
            <td>
                <input type="text" name="jobposting" value="<?php echo $obj->jobposting?>" />
            </td>
        </tr>
        <tr>
            <td width="10%">
                Số resum nhận/tháng:
            </td>
            <td>
                <input type="text" name="resumespermonth" value="<?php echo $obj->resumespermonth?>" />
            </td>
        </tr>
        <tr>
            <td width="10%">
                Giá:
            </td>
            <td>
                <input type="text" name="price" value="<?php echo $obj->price?>" />
            </td>
        </tr>
                
            
		
    </table>
     
</div> 
<div class="clear"></div>


<!-------------END CONTENT OF EACH MODULE ---------------------------->

</form>
<script language="javascript">
function save()
{
	$.post("load.php?path=<?php echo $objModule->ModuleID?>/<?php echo $objModule->ModuleID?>process&func=save",$("#frm").serialize(),function(data){
		if(data == "true")
			window.location = "?module=<?php echo $objModule->ModuleID?>";
		else
			$("#error").html(data).show("slow");
		
	})
}

</script>